<?php
namespace Home\Controller;
class IndexController extends HomeBase {
    public function index(){

         $this->display();
    }


    #todo 淦
    public function rwn(){
        $catid=I('get.catid',0,'int');
        if(empty($catid)){
            $this->error('栏目不存在');
        }
        $categorys=getcategory($catid);
        $model=getModel($categorys['modelid'],'tablename');
        $action=$categorys['action']?$categorys['action']:'index';
        $route=ucfirst($model).'/'.$action;
        R($route);
        $this->display($route);
    }
}